from utils.netFunction import *
from utils.readUtil import *


if __name__ == "__main__":

    header = readHear("header/android/header")
    disHeader = readHear("header/disConnect/header")
    disHeader['User-Agent'] = header['User-Agent']
    netInformation, cookies = getNetInformation()
    print(netInformation)
    user = {}
    for i in netInformation:
        user[i.split("=")[0]] = i.split("=")[1]
    try:
        userid = input("输入账号")
        passwd = input("输入密码")
        res = loginNet(userid, passwd, header)
        print(res)
    except ZeroDivisionError as e:
        print(e)
    # try:
    #     res = disConnect(acip='10.95.254.1',
    #                userip=user['wlanuserip'],
    #                acname=user['wlanacname'],
    #                mac=user['mac'],
    #                userid=userid,
    #                header=disHeader)
    # except ZeroDivisionError as e:
    #     print(e)

